<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        a{
            float: left;
            border: 1px #ccc solid;
            padding: 10px;
            margin-right: 20px;
            margin-top: 20px;
            box-shadow: 0 0 5px 5px #ccc;
            border-radius: 5px;
        }
        .box{
            clear: both;
            padding-top: 20px;
        }
    </style>
</head>
<body>
    
    <div id="app">
        <router-link to="/phone?name=天空之境">
            <img src="../lib/手机图片/small/天空之境small.png" alt="">
            <h3>天空之境</h3>
        </router-link>
        <router-link to="/phone?name=赤茶橘">
            <img src="../lib/手机图片/small/赤茶橘small.png" alt="">
            <h3>赤茶橘</h3>
        </router-link>
        <router-link to="/phone?name=翡冷翠">
            <img src="../lib/手机图片/small/翡冷翠small.jpg" alt="">
            <h3>翡冷翠</h3>
        </router-link>
        <router-link to="/phone?name=幻夜黑">
            <img src="../lib/手机图片/small/幻夜黑small.jpg" alt="">
            <h3>幻夜黑</h3>
        </router-link>

        <router-view></router-view>
    </div>

    <template id="info">
        <div class="box">
            <!-- <img src="../lib/手机图片/big/天空之境.jpg" alt=""> -->
        <img :src="'../lib/手机图片/big/' + this.$route.query.name + '.jpg'">
        </div>
    </template>

    <script src="../lib/Vue/vue.js"></script>
    <script src="../lib/Vue/vue-router.js"></script>
    <script>

        const router = new VueRouter({
            routes: [
                {
                    path: '/phone',
                    component: {
                        template: '#info'
                    }
                }
            ]
        })

        var vm = new Vue({
            el: '#app',
            router
        })
    </script>
</body>
</html>